
@extends('layouts.admin')
      @section('xgshopym')
      <li><a href="{{URL('admin/shopym')}}"> 编辑商品</a></li>
      <li><a href="{{URL('admin/shopym/add')}}"> 增加商品</a></li>
      @endsection
      @section('xgleibie')
      <li><a href="{{url('admin/leibie')}}" >编辑类别</a></li>
      <li><a href="{{url('admin/leibie/add')}}" > 增加类别</a></li>
      @endsection
      @section('xgvip')
      <li><a href="{{url('admin/user')}}"><i class="fa fa-user"></i><span>会员管理</span></a></li>
      @endsection
      @section('xgdingdan')
      <li><a href="{{url('admin/dingdan')}}"><i class="fa fa-cube"></i><span>编辑订单</span></a></li>
      @endsection
      @section('zjgonggao')
      <li><a href="{{URL('admin/gonggao')}}" > 编辑公告</a></li>
      <li><a href="{{URL('admin/gonggao/add')}}" class="active"> 增加公告</a></li>
      @endsection
      @section('page-wrapper')
      <div class="content">
            <div class="row">
                <div class="col-sm-12">
                    <h4 class="page-title">添加公告</h4>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="card-box">
                  
                        <h4 class="card-title" style="color: #009efb;cursor:pointer;" ><i class="fa fa-hand-o-left" aria-hidden="true"  style="margin-right: 3px;"></i><a onclick="javascript:history.back(-1);" >返回</a></h4>
                        <form action="addgonggao" method="post" onSubmit="return chkinput(this)" >
                            <div class="form-group row">
                            <label class="col-form-label col-md-1.5"  style="margin-left: 11px;">公告主题</label>
                                <div class="col-md-3">
                                    <input type="text" class="form-control" name="title">
                                </div>
                            </div>
                            {{csrf_field()}}
                            <div class="form-group row">
                                <label class="col-form-label col-md-1.5" style="margin-left: 11px;">公告内容</label>
                                <div class="col-md-5 ">
                                  <textarea name="textarea" id=""  class="form-control"  rows="10" cols="70"></textarea>
                                </div>
                            </div>
                            <div class="form-group row" style="margin-left: 53.5px;margin-top: 30px;">
                              <div class="col-md-1">
                                  <input type="submit" value="提交"  class="btn btn-primary" style="color: #fff;border-style: none;">
                              </div>
                              <div class="col-md-1">
                                <input type="reset" value="重置"  class="btn btn-primary" style="color: #fff;background-color:#888;border-style: none;">
                            </div>
                          </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
  <script language="javascript">
  function chkinput(form)
   {
     if(form.title.value=="")
	 {
	   alert("请输入公告主题!");
	   form.title.select();
	   return(false);
	 }
     if(form.textarea.value=="")
	 {
	   alert("请输入公告内容!");
	   form.textarea.select();
	   return(false);
	 }
	 return(true);
   }
</script>
@endsection


